# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

inherit gnome2 vala

DESCRIPTION="Gedit plugin for programming in Vala."
HOMEPAGE="http://code.google.com/p/vtg/"
SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+gen-project nls -debug"

RDEPEND=">=dev-libs/glib-2.28:2
	>=x11-libs/gtk+-3.0.0:3
	>=app-editors/gedit-2.91.0
	>=x11-libs/gtksourceview-2.91.0:3.0
	>=dev-lang/vala-0.11.0:0.12
	>=dev-libs/libpeas-0.7.4[gtk,vala]
	>=dev-libs/afrodite-${PV}"
DEPEND="${RDEPEND}"

DOCS="README AUTHORS NEWS"

VALA_REQUIRED_VERSION="0.12"

src_configure() {
	econf \
		--enable-vtg-plugin \
		--disable-afrodite \
		--with-systemlibs \
		$(use_enable gen-project) \
		$(use_enable nls) \
		$(use_enable debug)
}

src_install() {
	emake DESTDIR="${D}" install
}

pkg_postinst() {
	gnome2_pkg_postinst
	vala_pkg_postinst
}
